package cn.silver.module.system.enums;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum PostTypeEnums {
    MANAGER("01","管理岗"),
    PROFESSION("02","专业技术岗"),
    WORKER("03","工勤技能岗"),
    ;
    private final String code;
    private final String name;
    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
    }
}
